/**
 * Created by yanghaibo on 2016/10/25.
 */
MemberInfoController = function () {

    // 获取储值信息
    this.cardInfo = function(memberCardId) {
        var serverUrl = App.serverUrl +　"pos/member/cardInfo.do";
        var param  = {
            memberCardId: memberCardId
        }; // 参数
        var sucFunc = function (data) {
            common.closeLoading();

            if (data.result.ret == 0) {
                // 调用成功
                var result = data.result.responsedata;
                if (result && result.success) {
                    // 后端返回成功
                    var resultObj = result.resultObject;
                    memberInfoParam.mobile = resultObj.phoneNum;
                    // 渲染模板
                    CommonUtil.render($("#memberInfoPage form"), "memberInfoTpl", resultObj);
                } else {
                    DialogUtil.dialogWarn(result.msg);
                    log4JS.info("cardInfo server fail. " + result.msg);
                }
            } else {
                // 调用失败
                log4JS.info("cardInfo fail. " + data.result.txt);
                DialogUtil.dialogWarn();
            }
        };
        common.loading();
        AppUtil.sendPostMsg(serverUrl, param, sucFunc);
    };

};